package com.hwtx.form.domain.service;

import com.hwtx.form.dto.RoleDataResourceDto;
import io.geekidea.boot.framework.page.Paging;
import io.geekidea.boot.system.dto.RoleMenusDto;
import io.geekidea.boot.system.dto.UserDto;
import io.geekidea.boot.system.entity.SysOrgRole;
import io.geekidea.boot.system.entity.SysOrgUser;
import io.geekidea.boot.system.query.SysUserQuery;
import io.geekidea.boot.system.vo.SysMenuTreeVo;
import io.geekidea.boot.system.vo.SysUserVo;

import java.util.List;
import java.util.Set;

public interface RacService {
    boolean saveUserInfo(UserDto userDto);

    List<Long> getOrgIdsByUserId(Long userId);

    Paging<SysUserVo> getAssignedOrgUsersPage(SysUserQuery query);

    boolean deleteUser(Long userId);

    void bindOrgUsers(List<SysOrgUser> orgUsers);

    boolean unBindOrgUsers(List<SysOrgUser> orgUsers);

    boolean assignRoles(List<SysOrgRole> orgRoles);

    List<SysOrgRole> getRolesByOrgId(Long orgId);

    List<Long> getRolesByUserId(Long userId);

    /**
     * 设置角色权限
     */
    boolean setRoleMenus(RoleMenusDto roleMenusDto);

    Set<Long> getUserResources(Long userId);

    RoleDataResourceDto getRoleDataResource(Long roleId);

    boolean saveRoleDataResource(RoleDataResourceDto roleDataResourceDto);

    List<SysMenuTreeVo> getRoleForMenus(Long roleId, String keyword);

    List<RoleDataResourceDto> getRoleDataResourceByUser(Long userId);

    List<Long> getAllRoleIdsByUserId(Long userId);
}
